<?php
if(isset($_POST['btnSubscribe']))
{
	$Email = $_POST['txtEmail'];
	$sql = "INSERT INTO Newsletters(Email, NgayDangKy, NhanTin) VALUES('$Email', CurDate(), 1)";
	if(!mysql_query($sql))
	{
		$errSubscribe = "<br>$Email was in used !";
	}
	else
	{
		$errSubscribe = "<br>You will be received our hot news!";
	}
}
?><div style="margin-top:-17px">
<form method="post"><br />

	<input type="text" name="txtEmail" style="width: 90%;" />
	<?php echo $errSubscribe?><br />

	<div align="right" style="padding-right:10px; padding-top:5px"><input class="art-button" type="submit" name="btnSubscribe" value="Subscribe" /></div>
</form></div>